home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20010921-20020314 / 000113_belal@caldera.com_Mon Nov 5 10:07:09 EST 2001.msg < prev    next >
Text File  |  2020-01-01  |  9KB  |  171 lines

  1. Article: 12931 of comp.protocols.kermit.misc
  2. Newsgroups: comp.unix.sco.misc,comp.protocols.kermit.misc
  3. Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!iad-peer.news.verio.net!news.verio.net!news.harvard.edu!news.fas.harvard.edu!newsreader.wustl.edu!unlnews.unl.edu!headwall.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!jfk3-feed1.news.digex.net!dca6-feed2.news.digex.net!intermedia!newsfeed1.cidera.com!Cidera!cyclone.nyroc.rr.com!news-east.rr.com!cyclone.kc.rr.com!news.kc.rr.com!nntp3.cerf.net!enigma.xenitec.on.ca!news.xenitec.on.ca!news
  4. From: Bela Lubkin <belal@caldera.com>
  5. Subject: Re: Dropping DTR in OSR5
  6. Resent-From: mmdf@xenitec.on.ca
  7. Submit-To: scomsc@xenitec.on.ca
  8. Content-Type: text/plain; charset=us-ascii
  9. Organization: [resent by] The SCOMSC gateway and Propagation Society
  10. Content-Disposition: inline
  11. Date: Mon, 5 Nov 2001 03:51:43 GMT
  12. Message-ID: <20011104195143.B13779@mammoth.ca.caldera.com>
  13. User-Agent: Mutt/1.2.5i
  14. To: scomsc@xenitec.on.ca
  15. Mime-Version: 1.0
  16. In-Reply-To: <9s4qjp$30k$1@newsmaster.cc.columbia.edu>; from fdc@watsun.cc.columbia.edu on Mon, Nov 05, 2001 at 01:39:05AM +0000
  17. References: <9s40rp$fdh$1@newsmaster.cc.columbia.edu> <3be5c667$0$439$8eec23a@newsreader.tycho.net> <20011104160917.A13779@mammoth.ca.caldera.com> <9s4qjp$30k$1@newsmaster.cc.columbia.edu>
  18. Sender: belal@caldera.com
  19. Precedence: list
  20. Lines: 148
  21. Xref: newsmaster.cc.columbia.edu comp.unix.sco.misc:139892 comp.protocols.kermit.misc:12931
  22.  
  23. Frank da Cruz wrote:
  24.  
  25. > In article <20011104160917.A13779@mammoth.ca.caldera.com>,
  26. > Bela Lubkin  <belal@caldera.com> wrote:
  27. > : John DuBois wrote:
  28. > : > ...
  29. > : > Some problems in this area were fixed in 5.0.6a.  Please test on that
  30. > : > release and see if you still encounter this problem.
  31. > : 
  32. > : While this is true, Frank likes to support every OS ever made.  I
  33. > : believe he still builds binaries for SCO Xenix.  A solution which
  34. > : requires users to have an OS less than a year old won't satisfy him...
  35. > : 
  36. > Strange but absolutely true.  People still run old -- even ancient --
  37. > Unix OS's, including SCO Xenix.  Doctors' offices are a good place to
  38. > look for computing antiques.  I know a doctor who runs his practice from
  39. > an AT&T 3B2.  The billing package only runs there, the vendor disappeared
  40. > decades ago...
  41.  
  42. It's a good thing you're doing, providing support for the stragglers.
  43.  
  44. > : The OpenServer "sio" driver doesn't implement ispeed and ospeed as
  45. > : separate entities.  The functions exist and the structures have all the
  46. > : necessary members, but it doesn't pay attention to the input rate, only
  47. > : the output rate.  At least, that's how it's _intended_ to work.
  48. > :
  49. > Aha, the truth comes out...  Strict POSIX on the outside, not so strict
  50. > on the inside :-)
  51.  
  52. Yep, just like every piece of software that claims adherence to any sort
  53. of public standard...
  54.  
  55. > Actually a pet peeve of mine is how latter-day SCO header files (and
  56. > most other vendors) are full of:
  57. >   #if !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE)
  58. > to keep you from getting at anything useful -- hardware flow control, for
  59. > example.  In many cases also high serial speeds.  But I digress...
  60.  
  61. The devsys engineers at SCO (and perhaps today at Caldera) believed that
  62. if you asked for POSIX compliance, you were asking the devsys to act as
  63. a filter to prevent you from doing anything that wasn't specified in the
  64. POSIX standard(s) in question; i.e. you were doing primary development
  65. on this platform and wanted to be kept away from anything that would
  66. make your code non-portable.  Most users, of course, think of these
  67. flags as an _enabler_, "please _give_ me access to all the stuff implied
  68. by such-and-such standard".  These are radically incompatible semantics.
  69.  
  70. The OSR5 devsys defaults to an "XPG plus" mode that is intended to give
  71. you everything in all the standards the OS supports, plus whatever local
  72. oddities exist.  Most cases where functionality is hidden behind an
  73. ifdef like you show above, are probably bugs.  They _should_ say:
  74.  
  75.   #if !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE) || defined(_XOPEN_SOURCE_EXTENDED)
  76.  
  77. I looked through the 13 header files that match, and some need to stay
  78. the way they are; and changing any of them would probably break the
  79. build of various already-ported programs.  So, probably shouldn't mess
  80. with them.
  81.  
  82. > : I vaguely remember that you can get into trouble -- confuse the driver --
  83. > : by trying to change both.  This might have been one of the things fixed in
  84. > : rs506a.  But I think the problem can be avoided on all releases, by only
  85. > : programming the output speed.  So, suppose you test with only changing
  86. > : ospeed, see whether that makes a difference?
  87. >
  88. > I just tried this on 5.0.2 -- no difference.  DTR and RTS go down,
  89. > but only DTR come back up.
  90.  
  91. Ok, so much for vague memories.
  92.  
  93. > : This also isn't a general solution.  There are third party drivers that
  94. > : slot into the same ioctls, but _do_ correctly support independent i/o
  95. > : speeds.  Does Kermit have any system-specific hint settings?  Something
  96. > : like an OpenServer-specific "set ignore-ospeed", turned on by default?
  97. > : "On" is the correct default since "sio" is the most common serial driver
  98. > : on OpenServer, and split-speed usage is rather uncommon.
  99. >
  100. > The third-party drivers is a land I don't have a passport for.  Device
  101. > names, lockfile conventions, who knows what else.  I have reams of
  102. > correspondence on this stuff, and the conclusion is always "don't touch
  103. > it".  I figure if Digi or Stallion or somebody wants Kermit to support
  104. > their stuff, they'll contact me about it.
  105.  
  106. Hmmm, I would expect Kermit to just work with 3rd party drivers on OSR5.
  107. Device names?  Kermit shouldn't care -- if I tell it "let's talk on
  108. /dev/ttyi13A" it should say "ok, boss".  Lockfile convention are
  109. something you have to work out between you and other user-level programs
  110. (like the OS's `cu` and `uucico`), not with drivers; and the answers for
  111. OSR5 are well known.
  112.  
  113. > : And, if I'm wrong, you might try an even kludgier workaround (which also
  114. > : might not work, but is definitely worth trying): after having performed
  115. > : all the POSIXly correct incantations, i.e. after the 2nd tcsetattr() in
  116. > : your pseudo-code above, force an extra open of the port:
  117. > : 
  118. > :   ...
  119. > :   tcsetattr()
  120. > :   if ((kludge_fd = open(the_port, O_RDONLY | O_NONBLOCK | O_NOCTTY)) >= 0)
  121. > :     close(kludge_fd);
  122. > : 
  123. > : I'm pretty sure this will cause "sio" to get its house in order and
  124. > : raise DTR (and the close shouldn't lower it, since the other open still
  125. > : exists).  For debugging purposes you might need to put in a pause before
  126. > : the close() to observe that DTR actually goes on -- I don't fully trust
  127. > : my assertion that the close() won't lower it.
  128. >
  129. > In fact DTR comes back on, but RTS stays down, just as without the kludge.
  130. > The kludge does make a difference in 5.0.5, however: it makes it act like
  131. > 5.0.2 (without the kludge in 5.0.5, both DTR and RTS stayed down).
  132.  
  133. Oh well.
  134.  
  135. > : One last thing.  There's a comment in the driver that implies that after
  136. > : cycling the baud rate through 0, DTR might not come back up immediately;
  137. > : might only come up when you output a character.  I'm pretty sure this is
  138. > : fixed in rs506a, but for older releases, see whether outputting a NUL
  139. > : after the 2nd tcsetattr() causes DTR to wake up.
  140. >
  141. > In 5.0.2 DTR came up anyway, but RTS does not come back up, even when you
  142. > send bytes.   Ditto for 5.0.5 with and without all the above tricks.
  143. > In short there seems to be no way to do this in OSR5 prior to 5.0.6a.  Hard
  144.  
  145. and you only have John's say-so with regard to 506a...
  146.  
  147. > to believe, right?  But not surprising either since I think Kermit must be
  148. > the only program that would want to momentarily drop DTR without closing the
  149. > device (and of course the problem with closing the device is that you've
  150. > lost all the myriad setups you've done on it when you reopen it).
  151.  
  152. Well, no, people are asking all the time about what ioctls to use to
  153. drop DTR momentarily.  Which is why John finally implemented TIOCMGET et
  154. al for 506a; which of course doesn't help you.
  155.  
  156. One more trick you could do -- but which does more firmly tie you to
  157. "sio".  If you're working on tty1a, open and close tty1A.  That should
  158. be sufficient to kick RTS, DTR back to sanity.  And if you're working on
  159. 1A then open/close 1a.  None of which is particularly pleasant.  I might
  160. also be wrong in that _opening_ might fix RTS & DTR, but closing might
  161. screw them up again, so you would need to open and keep open the "other"
  162. device node.  (Then, next time you need to do something to force correct
  163. RTS & DTR, close and reopen that "other" port.)
  164.  
  165. yecch.
  166.  
  167. >Bela<
  168.